package com.qch.rabbitmq.demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author qch
 * @Date 2021/5/14
 */
public class ConsumerApp {
    public static void main(String[] args)  {
         //new AnnotationConfigApplicationContext(RabbitConfig.class);
        new AnnotationConfigApplicationContext(RabbitConfig.class);
        /*RabbitTemplate template = applicationContext.getBean(RabbitTemplate.class);
        Message receive = template.receive("queue.ano");
        System.out.println(new String(receive.getBody(),receive.getMessageProperties().getContentEncoding()));
        ((AnnotationConfigApplicationContext) applicationContext).close();*/
    }
}
